package xyz.csmemo.novel.core.auth;

import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;
import xyz.csmemo.novel.core.common.exception.BusinessException;
import xyz.csmemo.novel.core.util.JwtUtils;
import xyz.csmemo.novel.manager.cache.UserInfoCacheManager;

@Component
@RequiredArgsConstructor
public class FrontAuthStrategy implements AuthStrategy {
    private final JwtUtils jwtUtils;

    private final UserInfoCacheManager userInfoCacheManager;

    @Override
    public void auth(String token, String requestUri) throws BusinessException {
        authSSO(jwtUtils, userInfoCacheManager, token);
    }
}
